home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / perl5 / Binfmt / Lib.pm < prev   
Encoding:
Perl POD Document  |  2006-06-19  |  1.6 KB  |  52 lines

  1. package Binfmt::Lib;
  2.  
  3. # Copyright (c) 2000, 2001, 2002 Colin Watson <cjwatson@debian.org>.
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  18.  
  19. # There are no published interfaces here. If you base code outside
  20. # binfmt-support on this package, it may be broken at any time.
  21.  
  22. use strict;
  23. use vars qw(@ISA @EXPORT_OK $admindir $importdir $procdir $auxdir);
  24.  
  25. use Text::Wrap;
  26.  
  27. use Exporter ();
  28. @ISA = qw(Exporter);
  29. @EXPORT_OK = qw($admindir $importdir $procdir $auxdir quit warning);
  30.  
  31. $admindir  = '/var/lib/binfmts';
  32. $importdir = '/usr/share/binfmts';
  33. $procdir   = '/proc/sys/fs/binfmt_misc';
  34. $auxdir    = '/usr/share/binfmt-support';
  35.  
  36. sub quit ($;@)
  37. {
  38.     my $me = $0;
  39.     $me =~ s#.*/##;
  40.     print STDERR wrap '', '', "$me:", @_, "\n";
  41.     exit 2;
  42. }
  43.  
  44. # Something has gone wrong, but not badly enough for us to give up.
  45. sub warning ($;@) {
  46.     my $me = $0;
  47.     $me =~ s#.*/##;
  48.     print STDERR wrap '', '', "$me: warning:", @_, "\n";
  49. }
  50.  
  51. 1;
  52.